<!doctype html>
<html lang="zh-cmn-Hans">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, shrink-to-fit=no"/>
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <link rel="stylesheet" type="text/css" href="./css/mdui.min.css">
    <style>
      .botp {
        width: auto;
        margin-top: 12.5%;
      }
      body {
        font-family: "Helvetica Neue", Helvetica, Microsoft Yahei, sans-serif;
        min-width: 300px;
      }
    </style>
    <title>Acdp Start</title>
  </head>
  <body class="mdui-appbar-with-toolbar mdui-theme-accent-blue mdui-theme-layout-auto">
    
    <div style="height: 50px;" class="mdui-appbar mdui-appbar-fixed mdui-color-white mdui-shadow-1">
        <div style="height: 50px;" class="mdui-toolbar">
          <a href="javascript:;" class="mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">menu</i></a>
          <a href="javascript:;" class="mdui-typo-title">Acdp Start</a>
          <div class="mdui-toolbar-spacer"></div>
          <a id="re" href="javascript:;" onclick="location.reload();" class="mdui-btn mdui-btn-icon"><i class="mdui-icon material-icons">refresh</i></a>
        </div>
    </div>

    <div id="spi" class="mdui-center mdui-spinner mdui-spinner-colorful"></div>

    <svg id="svg" class="mdui-center mdui-text-color-red mdui-m-t-5 mdui-hidden" width="100" height="100" viewBox="0 0 24 24">><g fill="none"><path d="M12 2c5.523 0 10 4.478 10 10s-4.477 10-10 10S2 17.522 2 12S6.477 2 12 2zm0 1.667c-4.595 0-8.333 3.738-8.333 8.333c0 4.595 3.738 8.333 8.333 8.333c4.595 0 8.333-3.738 8.333-8.333c0-4.595-3.738-8.333-8.333-8.333zm-.001 10.835a.999.999 0 1 1 0 1.998a.999.999 0 0 1 0-1.998zM11.994 7a.75.75 0 0 1 .744.648l.007.101l.004 4.502a.75.75 0 0 1-1.493.103l-.007-.102l-.004-4.501a.75.75 0 0 1 .75-.751z" fill="currentColor"></path></g></svg>

    <div class="mdui-valign mdui-hidden mdui-m-t-5" id="sp" style="width: 100%;">
        <div class="mdui-center" id="text"></div>
    </div>

    <script src="http://127.0.0.1/alive"></script>
    <script>
    function AutoHei(){
        var winHeight=0;
        if (window.innerHeight){
            winHeight = window.innerHeight;
        }
        else if ((document.body) && (document.body.clientHeight)){
            winHeight = document.body.clientHeight;
        }
        if (document.documentElement && document.documentElement.clientHeight){
            winHeight = document.documentElement.clientHeight;
        }
        winHeight = winHeight - 350;
        document.getElementById("sp").style.height = winHeight +"px";
    }
    AutoHei();
    window.onresize = AutoHei;
    document.getElementById("text").innerHTML = "启动失败了，请检查服务是否运行<button onclick='document.getElementById(\"re\").click();;' class='mdui-center mdui-btn mdui-color-theme-accent mdui-ripple mdui-m-t-2'>重试</button>";
    document.getElementById("svg").classList.remove("mdui-hidden");
    document.getElementById("spi").classList.add("mdui-hidden");
    document.getElementById("sp").classList.remove("mdui-hidden");
    </script>
  </body>
</html>